/*
 * ControlButton serves the same purpose as a menu bar and can also diaply status indicators
 * by changing its emblem.
 */

#ifndef CONTROLBUTTON_HPP
#define CONTROLBUTTON_HPP

#include <Wt/WContainerWidget>
#include <Wt/WImage>
#include "MainMenu.hpp"

namespace webpages
{
    namespace components
    {
        class ControlButton : public Wt::WContainerWidget
        {

            
//             void setCSS3Styling(); 
            void onClick();
            
//             Wt::WImage* testA;
//             Wt::WImage* testB;
//             void testrender();
            
            Wt::WPopupMenu* popup;
            
//             void popupgoingtohide();
            
            Wt::WImage* status_emblem;
            void mousedOff();
            
            void changeColor();
            
            MainMenu* main_menu;
            bool is_small;
            
            void personIsTouching();
            void personStoppedTouching();
            
            
            
            // Only valide when the ControlButton is in its normal state.
            void shrink();
            
            // Only valid when the ControlButton is small.
            void expand(); 
            
        public:
            ControlButton(Wt::WContainerWidget* parent = 0);
        };
    }
}


#endif 